import { Entity, Column, PrimaryGeneratedColumn, OneToOne } from "typeorm"
import { Type } from "class-transformer"

@Entity('user')

export class User {
    @PrimaryGeneratedColumn()
    id: number

    @Column({ type: "varchar", charset: "utf8mb4" })
    username: string


    @Column({ type: "varchar", charset: "utf8" })
    password: string

    @Column({ type: "int" })
    male: number

    @Column({ type: "varchar", length: 255 })
    phone: string


    @Column({ type: "varchar", charset: "utf8",length: 255 })
    address: string

    @Column({ type: "int" })
    role: number

    @Column({ type: "varchar",charset: "utf8",length: 255 })
    email: string

    @Column({ type: "varchar", default: "" })
    ip: string
}